wayland: set a cursor when starting a drag
authorMatthias Clasen <mclasen@redhat.com>
Tue, 3 Jul 2018 18:58:31 +0000 (20:58 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 12 Jul 2018 11:02:42 +0000 (13:02 +0200)
Otherwise, we wont have one.

gdk/wayland/gdkdnd-wayland.c

index c889e9ee40897a9b6bd6e206f2b7c58d922a6f7c..195b86b76b950bf8ce3361ae78427022a6395839 100644 (file)
@@ -380,6 +380,7 @@ _gdk_wayland_surface_drag_begin (GdkSurface          *surface,
   GdkDrag *drag;
   GdkSeat *seat;
   GdkWaylandDisplay *display_wayland;
+  GdkCursor *cursor;
 
   display_wayland = GDK_WAYLAND_DISPLAY (gdk_device_get_display (device));
   seat = gdk_device_get_seat (device);
@@ -411,6 +412,9 @@ _gdk_wayland_surface_drag_begin (GdkSurface          *surface,
                             drag_wayland->dnd_wl_surface,
                              _gdk_wayland_display_get_serial (display_wayland));
 
+  cursor = gdk_drag_get_cursor (drag, gdk_drag_get_selected_action (drag));
+  gdk_drag_set_cursor (drag, cursor);
+
   gdk_seat_ungrab (seat);
 
   return drag;